﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ViewCart.aspx.cs" Inherits="ViewCart" Title="Giỏ hàng" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="art-post">
        <div class="art-post-tl">
        </div>
        <div class="art-post-tr">
        </div>
        <div class="art-post-bl">
        </div>
        <div class="art-post-br">
        </div>
        <div class="art-post-tc">
        </div>
        <div class="art-post-bc">
        </div>
        <div class="art-post-cl">
        </div>
        <div class="art-post-cr">
        </div>
        <div class="art-post-cc">
        </div>
        <div class="art-post-body">
            <div class="art-post-inner art-article">
                <h2 class="art-postheader">
                   Giỏ hàng của bạn</h2>
                                           <div class="art-postcontent">
                                           <br />

                                              <asp:ListView ID="ListView1" runat="server" DataKeyNames="IDTaiLieu" OnItemCommand="updating"
                                                   >
                                                  
                                                   <LayoutTemplate>
                                                       
                                                                   <table ID="itemPlaceholderContainer" runat="server" border="1" 
                                                                       class="table_view_cart">
                                                                       <tr runat="server" >
                                                                           <th style="width: 20px; " runat="server">
                                                                               </th>
                                                                           <th runat="server">
                                                                               Mã</th>
                                                                           <th runat="server">
                                                                               Tên tài liệu</th>
                                                                           <th runat="server">
                                                                               Số lượng</th>
                                                                           <th id="Th1" runat="server">
                                                                               Đơn giá</th>
                                                                           <th id="Th2" runat="server">
                                                                               Thành tiền</th>
                                                                              
                                                                       </tr>
                                                                       <tr ID="itemPlaceholder" runat="server">
                                                                       </tr>
                                                                       <tr>
                                                                       <td colspan="5" align="right" >Tổng tiền (VNĐ):</td>
                                                                       <td class="tien"> 
                                                                         <strong> <%= format_tt(tong_tien.ToString()) %>  </strong>
                                                                          <!-- <asp:Label ID="tong_tien" runat="server" Text='<%= DateTime.Now.ToShortDateString() %>'></asp:Label> -->
                                                                           </td>
                                                                       </tr>
                                                                       <tr><td colspan="6"><asp:Button ID="btnUpdate" runat="server"  Text="Cập nhật" Width="80px" CommandName="update_bt"  CssClass="art-button"/>
    <asp:Button ID="btnCheckout" runat="server"  Text="Thanh toán" Width="80px" PostBackUrl="~/DatHang/DatHang.aspx" CssClass="art-button"/></td></tr>
                                                                   </table>
                                                              
                                                   </LayoutTemplate>
                                                   <InsertItemTemplate>
                                                       <tr style="">
                                                           <td>
                                                               <asp:Button ID="InsertButton" runat="server" CommandName="Insert" 
                                                                   Text="Insert" />
                                                               <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                                                                   Text="Clear" />
                                                           </td>
                                                           <td>
                                                               &nbsp;</td>
                                                           <td>
                                                               <asp:TextBox ID="TenTLTextBox" runat="server" Text='<%# Bind("TenTL") %>' />
                                                           </td>
                                                           <td>
                                                               <asp:TextBox ID="DonGiaTextBox" runat="server" Text='<%# Bind("DonGia") %>' />
                                                           </td>
                                                       </tr>
                                                   </InsertItemTemplate>
                                                   <SelectedItemTemplate>
                                                       <tr style="background-color:#008A8C;font-weight: bold;color: #FFFFFF;">
                                                           <td>
                                                               <asp:Label ID="IDTaiLieuLabel" runat="server" Text='<%# Eval("IDTaiLieu") %>' />
                                                           </td>
                                                           <td>
                                                               <asp:Label ID="TenTLLabel" runat="server" Text='<%# Eval("TenTL") %>' />
                                                           </td>
                                                           <td>
                                                               <asp:Label ID="DonGiaLabel" runat="server" Text='<%# Eval("DonGia") %>' />
                                                           </td>
                                                       </tr>
                                                   </SelectedItemTemplate>
                                                   <EmptyDataTemplate>
                                                       <table runat="server" 
                                                           style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;">
                                                           <tr>
                                                               <td>
                                                                   No data was returned.</td>
                                                           </tr>
                                                       </table>
                                                   </EmptyDataTemplate>
                                                   <EditItemTemplate>
                                                       <tr style="background-color:#008A8C;color: #FFFFFF;">
                                                           <td>
                                                               <asp:Button ID="UpdateButton" runat="server" CommandName="Update" 
                                                                   Text="Update" />
                                                               <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                                                                   Text="Cancel" />
                                                           </td>
                                                           <td>
                                                               <asp:Label ID="IDTaiLieuLabel1" runat="server" 
                                                                   Text='<%# Eval("IDTaiLieu") %>' />
                                                           </td>
                                                           <td>
                                                               <asp:TextBox ID="TenTLTextBox" runat="server" Text='<%# Bind("TenTL") %>' />
                                                           </td>
                                                           <td>
                                                               <asp:TextBox ID="DonGiaTextBox" runat="server" Text='<%# Bind("DonGia") %>' />
                                                           </td>
                                                       </tr>
                                                   </EditItemTemplate>
                                                   <ItemTemplate>
                                                       <tr style="">
                                                       <td style="padding-left: 7px;">
                                                           <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="Image/drop.png" Text="Del" CommandName="del_bt" CommandArgument='<%# Eval("IDTaiLieu") %>'/>
                                                           </td>
                                                       
                                                           
                                                           <td>
                                                               <asp:Label ID="IDTaiLieuLabel" runat="server" Text='<%# Eval("IDTaiLieu") %>' />
                                                           </td>
                                                           <td>
                                                               <asp:Label ID="TenTLLabel" runat="server" Text='<%# Eval("TenTL") %>' />
                                                           </td>
                                                           <td style="width: 30px">
                                                               <asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval("SoLuong") %>'></asp:TextBox>
                                                               
                                                           </td>
                                                           <td class="tien">
                                                               <asp:Label ID="DonGiaLabel" runat="server" Text='<%# format_tt(Eval("DonGia").ToString()) %>'/>
                                                           </td>
                                                               
                                                               <td class="tien"><%# format_tt(Eval("ThanhTien").ToString())%>
                                                               
                                                           </td>
                                                             
                                                           
                                                       </tr>
                                                   </ItemTemplate>
                                               </asp:ListView>
                                               
    &nbsp; &nbsp;
    
                                           
                                          </div>
                                          
                                          <div class="cleared">
                </div>
            </div>
            <div class="cleared">
            </div>
        </div>
    </div>

</asp:Content>

